﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SuperX.Common.AppConfiguration
{
    public class ListenerCheckCfg
    {
        public bool DefaultCheck { get; set; } = false;

        /// <summary>
        /// 对内存MemorySampleFrequency(s)采样一次
        /// </summary>
        public int ListenMemoryFrequency { get; set; } = 10;

        /// <summary>
        /// 对cpu进行CpuSampleFrequency(s)采样一次
        /// </summary>
        public int ListenCpuFrequency { get; set; } = 10;

        /// <summary>
        /// 异常次数
        /// </summary>
        public int MemoryRiseTimes { get; set; } = 3;//内存上涨次数

        public int CupOverflowTimes { get; set; } = 3;//cpu超过占比的次数

        /// <summary>
        /// 最大内存(M)
        /// </summary>
        public double MemoryLimit { get; set; } = 1536;

        /// <summary>
        /// 最大cpu占比(%)
        /// </summary>
        public double CpuRateLimit { get; set; } = 90;

        /// <summary>
        /// 动态监测内存
        /// </summary>
        public bool DynamicCheckMem { get; set; }
    }
}